package com.itheima.Daome01.demo01.day0623;

import java.util.ArrayList;

public class Test03 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("张三分");
        list.add("张三二");
        list.add("李三");
        list.add("张三四");
        list.add("刘三");
        list.add("孙三");
        list.add("张三四");

        list.stream().filter(s -> s.startsWith("张"))
                .filter(s -> s.length()==3).distinct()
                .skip(2).limit(1).forEach(s -> System.out.println(s));

    }


}
